#include <cstring>
#include <dirent.h>
#include <fstream>
#include <iostream>
#include <sstream>
#include <stdlib.h>
#include <string>
#include <sys/ptrace.h>
#include <sys/reg.h>
#include <sys/resource.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/user.h>
#include <sys/wait.h>
#include <unistd.h>
using namespace std;

int main() {
  const char *astold = "/home/song/Desktop/graph/AST.txt";
  int i;
  std::ifstream fin(astold);
  std::string line;
  std::string astcontent = "";
char **classname,**base;
classname=(char **)malloc(20*sizeof(char *));
	for (i=0;i<20;i++)
		classname[i]=(char *)malloc(256*sizeof(char));
   int n=0;
  while (getline(fin, line)) {

    const char *cstr = line.c_str();
  
    char *pc = new char[100];
    strcpy(pc, cstr);
  
    int i;

 /*     if (pc[0] == '4'&& pc[1]=='4') {
          for(i=9;pc[i]!=',';i++)
          {
             cout<<pc[i];
          }
          
        }
*/
   if (pc[0] == '4'&& pc[1]==',') {
     
          int j;
          for(i=2;i<strlen(pc);i++)
          {
             cout<<pc[i];
          for(j=0;j<strlen(pc);j++)
         {
              classname[n][j]=pc[j+2];
          }
       //   strcpy(classname[0],pc);
          }
          cout<<endl;
         n++;
        }
  
  }
  for(i=0;i<n;i++)
{
  cout<<classname[i]<<"  ";
} 

 fin.close();
  return 0;
}
